﻿using PSDManager.SystemSettings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using CaseManagerLibrary.Encrypt;
namespace PSDManager
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            while (!AppSettings.Enabled)
            {
                FrmSettings setting = new FrmSettings();
                setting.StartPosition = FormStartPosition.CenterScreen;
                var result = setting.ShowDialog();

                if (result == DialogResult.Cancel && !AppSettings.Enabled)
                {
                    return;
                }
            }

            FrmLogin login = new FrmLogin();
            if (login.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //Application.Run(new FrmPSDClient());
                Application.Run(new FrmManager());
            }
        }
    }
}
